package com.aierkeji.b2c.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.aierkeji.b2c.entity.constant.OrderStatus;
import com.aierkeji.b2c.entity.constant.Source;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单状态历史纪录
 * @author admin
 *
 */
@Entity
@Table(name = "Akj_order_status_log")
public class AkjOrderStatusLog {
	
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	@Column(name = "id", length = 32)
	private String id;
	
	@Column(name="order_no",length=32)
	private String orderNo;

	@Column(name="create_by",length=300)
	private String createBy;//当CMS改变状态= cms username,当B2C改变状态=支付宝用户名称
	
	@Column(name="create_at",columnDefinition="datetime")
	private Timestamp createAt;
	
	
	@Column(name="status",length=10)
	@Enumerated(EnumType.STRING)
	private OrderStatus status;
	
	@Column(name="remark",length=400)
	private String remark;//备注

	@Column(name="source",length=3)
	@Enumerated(EnumType.STRING)
	private Source source;//更新来源:CMS,B2C

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}



	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Timestamp getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Timestamp createAt) {
		this.createAt = createAt;
	}

	public OrderStatus getStatus() {
		return status;
	}

	public void setStatus(OrderStatus status) {
		this.status = status;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Source getSource() {
		return source;
	}

	public void setSource(Source source) {
		this.source = source;
	}

	

}
